<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      >
    <h:head>
        <title>Test Page</title>
        
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="./adminItem/css/reset.css" rel="stylesheet" type="text/css" />
        <link href="./adminItem/css/main.css" rel="stylesheet" type="text/css" />
        <link href="./adminItem/css/style.css" rel="stylesheet" type="text/css" />
        <link href="./adminItem/css/skin.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" href="./adminItem/css/nivo-default.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="./adminItem/css/nivo-slider.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="./adminItem/css/prettyPhoto.css" type="text/css" media="screen" />
        <link rel="stylesheet" href="./adminItem/css/prettyGallery.css" type="text/css" media="screen" /> 

        

    </h:head>
    <h:body style="background:url(./adminItem/images/bg2.jpg) repeat-x;">
        
        
            <p:panel style="top:0px; width: 250px; position: fixed;">
                <h4>Session Info</h4>
                <br/>
                <h:panelGrid columns="2">
                    <b>Account ID: </b> <h:outputText value="#{fakeMainPortalMB.getCustomerID()}"/>
                    <b>Email:</b> <h:outputText value="#{fakeMainPortalMB.getLoginEmail()}"/>
                    <b>Account Type:</b> <h:outputText value="#{fakeMainPortalMB.retrieveAccountType()}"/>
                    <b>Loyalty Points:</b> <h:outputText value="#{fakeMainPortalMB.getUserLoyaltyPoints()}"/>             
                </h:panelGrid>
            </p:panel>
        

        
        
    <div style="margin-right:100px; margin-left:300px;">
    <!--*********************************************************************************************************-->      
         <p:panel>
        <h3>ADMIN</h3>
        <br/>
        <h4>Admin Portal</h4>
        <h:form>
            <p:commandButton action="admin/home?faces-redirect=true" actionListener="#{fakeMainPortalMB.adminLogin()}" value="Access TCube Functions"></p:commandButton> 
        </h:form>
        
        <h:form>
            <p:commandButton action="#{fakeMainPortalMB.removeAllSessionAttributes()}" value="Purge All Session Attributes"/>
        </h:form>
        <br/>
        <h4>Billing Controls</h4>
        <br/>
        <h:outputLabel value="#{billingMB.getBillingStatus()}" escape="false"></h:outputLabel>
        <br/>
        <h:form>
            <p:commandButton action="#{billingMB.startBilling()}" value="Enable Billing" ajax="false"/>&nbsp;&nbsp;
            <p:commandButton action="#{billingMB.stopBilling()}" value="Disable Billing" ajax="false"/>
            <br/>
            <p:commandButton action="#{billingMB.enableDemoBilling()}" value="Use Demo Billing" ajax="false"/>&nbsp;&nbsp;
            <p:commandButton action="#{billingMB.disableDemoBilling()}" value="Switch back to Actual Billing" ajax="false"/>
            <br/>
        </h:form>
        
        
        
    </p:panel>
        
        <br/><br/><br/>
        
        
    <p:panel>
        <h3>STAKEHOLDER</h3>
        <br/>  
        <h4>Stakeholder Portal</h4>
        <h:form>
             Representative Email: <h:inputText value="#{fakeMainPortalMB.loginEmail}"/><br/>
             Stakeholder Name (manual): <h:inputText value="#{fakeMainPortalMB.stakeholderName}"/><br/>
<!--             Food Stakeholders<br/>
             <h:selectOneMenu value="#{fakeMainPortalMB.stakeholderName}" style="width:220px;" onselect="">
                <f:selectItems value="#{fakeMainPortalMB.getAllFoodStakeholderNames()}"/>
             </h:selectOneMenu>-->
<h:outputLabel for="stakeholderName" value="Name:" />
            <p:commandButton action="stakeholder/home?faces-redirect=true" actionListener="#{fakeMainPortalMB.stakeholderLogin(fakeMainPortalMB.stakeholderName)}" value="Manage This Stakeholder">
                <f:setPropertyActionListener target="#{stakeholderPerformanceMB.stakeholderName}" value="#{fakeMainPortalMB.stakeholderName}"/>
                <f:setPropertyActionListener target="#{stakeholderPerformanceMB.stakeholderId}" value="#{stakeholderPerformanceMB.findId(fakeMainPortalMB.stakeholderName)}"/>
            </p:commandButton> 
        </h:form>
        
    </p:panel>
        
        <br/><br/><br/>
        
    <p:panel>
        <h3>USER</h3>
        <br/>
        <h4>Login as a user</h4>
        <h:form>
                    <h:selectOneMenu value="#{fakeMainPortalMB.loginEmail}" style="width:220px;">
                        <f:selectItems value="#{fakeMainPortalMB.getAllUserEmails()}"/>
                    </h:selectOneMenu>
                    <p:commandButton action="#{fakeMainPortalMB.login()}" value="Log in (old version)" />&nbsp;&nbsp;&nbsp;
                    <p:commandButton action="member/home?faces-redirect=true" actionListener="#{fakeMainPortalMB.login()}" value="Log in (CM Team layout)" /><br/> 
        </h:form>
    </p:panel>
        
        <br/><br/><br/>
        

    <!--*********************************************************************************************************-->    
    </div>    
        
   
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        

    </h:body>
</html>